<?php

include_once 'Attributes.php';

class TypeAttributes extends Attributes
{
    public function set_abstract($abstract)
    {
        parent::set_abstract($abstract);
        
        if($abstract)
        {
            $this->final = false;
        }
    }
    
    public function get_final()
    {
        return $this->final;
    }

    public function set_final($final)
    {
        if(is_bool($final))
        {
            $this->final = $final;
            if($final)
            {
                $this->abstract = false;
            }
        }
        else
        {
            throw new InvalidArgumentException(
                'The value is not boolean.');
        }
    }

    private $final = false;
}

?>
